<?php

namespace App\Admin\Controllers;

use App\Http\Controllers\Controller;
use App\NaiveUI\Button;
use Illuminate\Http\JsonResponse;
use LowCode\Block;
use LowCode\Page;

class DemoController extends Controller
{
    public function button(): JsonResponse
    {
        $block = Block::make("HomeBlock", function (Block $block){
            $block->nodes([
                Button::example()->class("w-full py-4 px-6")
            ]);
        });
        $page = Page::make($block);
        return $this->result($page);
    }
}
